<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script>
        let arr = ['apple','banana','orange','tomato'];

        for(let val of arr){
            console.log(val);
        }

        for(let index of arr.keys()){
            console.log(index);
        }

        for(let item of arr.entries()){
            console.log(item);
        }

        for(let [key,value] of arr.entries()){
            console.log(key,value);
        }
    </script>
</head>
<body>
    
</body>
</html>